net: support krunkit network.mode: shared#1560
Conversation
Signed-off-by: Arlan Lloyd <arlanlloyd@gmail.com>
|
Confirmed that Thanks again for this project! Next item to start testing is if I can get a GPU accelerated pod running in Kubernetes. |
|
I think this PR can be merged. Verified functionality of network and GPU passthru. Going to dump some of my progress here. I was able to get the GPU Pass Thru following the same demo code here https://github.com/medyagh/ai-playground-minikube/tree/main/macos with one small change. squat/generic-device-plugin image tag was not specified so its pulling a newer version to create that container. That version uses 🍎 ❯ kubectl exec pod/uvkc-gpu -it -- /uvkc/mad_throughput
2026-04-18T15:58:20+00:00
Running /uvkc/mad_throughput
Run on (4 X 48 MHz CPU s)
Load Average: 2.19, 0.78, 0.47
-----------------------------------------------------------------------------------------------------------------------------------------
Benchmark Time CPU Iterations UserCounters...
-----------------------------------------------------------------------------------------------------------------------------------------
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f32/1048576/100000/manual_time 511694 us 2334 us 1 FLOps=4.09845T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f32/1048576/200000/manual_time 1022130 us 4107 us 1 FLOps=4.10349T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f16/1048576/100000/manual_time 280612 us 1820 us 3 FLOps=7.4735T/s
Virtio-GPU Venus (Apple M5 Pro)/mad_throughput_f16/1048576/200000/manual_time 558286 us 2800 us 1 FLOps=7.51282T/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f32/1048576/100000/manual_time 22940306 us 27.6 us 1 FLOps=91.4178G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f32/1048576/200000/manual_time 45849904 us 23.7 us 1 FLOps=91.479G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f16/1048576/100000/manual_time 72468475 us 23.0 us 1 FLOps=28.9388G/s
llvmpipe (LLVM 20.1.7, 128 bits)/mad_throughput_f16/1048576/200000/manual_time 368624292 us 87.0 us 1 FLOps=11.3783G/sHowever when I go to use the root@llama-server-7988bcff84-p9l4t:/app# ./llama-cli --list-devices
load_backend: loaded CPU backend from /app/libggml-cpu-armv8.2_2.so
Available devices:root@llama-server-7988bcff84-p9l4t:/app# apt-get update && apt-get install -y vulkan-tools
...
...
...
root@llama-server-7988bcff84-p9l4t:/app# vulkaninfo
ERROR at ./vulkaninfo/./vulkaninfo.h:613:vkCreateInstance failed with ERROR_OUT_OF_HOST_MEMORYstill troubleshooting, but that is unrelated to this PR. EDIT: |
|
This was actually an oversight from me. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.10.1` → `v0.10.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>abiosoft/colima (abiosoft/colima)</summary> ### [`v0.10.3`](https://github.com/abiosoft/colima/releases/tag/v0.10.3) [Compare Source](abiosoft/colima@v0.10.2...v0.10.3) #### Highlights This is an hotfix release to address a regression for Kubernetes runtime. #### Commits - k3s: fix restart failure due to rsync by [@​abiosoft](https://github.com/abiosoft) in [#​1582](abiosoft/colima#1582) **Full Changelog**: <abiosoft/colima@v0.10.2...v0.10.3> ### [`v0.10.2`](https://github.com/abiosoft/colima/releases/tag/v0.10.2) [Compare Source](abiosoft/colima@v0.10.1...v0.10.2) #### Highlights This is an incremental stability release with bug fixes and features. ##### Updates - New `--downloader` flag to retain curl for downloads. Supports `curl` or `native` (default). - Force stop with `colima stop --force` no longer attempts to stop the container runtime before stopping VM. - Support for user-provided containerd and buildkit config for the Containerd runtime. - Nested virtualization is now supported with `krunkit` vm type. - Soft delete (i.e. `colima delete` without `--force`) is now properly supported on Incus runtime, and container data would be auto-restored on recreation. - Cache directory can now be customized with the `COLIMA_CACHE_HOME` environment variable. The cache directory stores the downloaded assets used by Colima. - Network address is now supported for the `krunkit` vm type. - Runtime is now displayed in `colima list` for stopped instances. - Custom generated disk images can now be used by setting the `--force-disk-image` flag in addition to `--disk-image` flag. The image must be a debian based distro with systemd. ***Note that this is for power users and not officially supported***. ##### Runtime version bumps **NOTE:** container runtime versions can be updated manually by running the `colima update` command. - Docker version updated to `v29.5.2` - Nerdctl version updated to `v2.3.1` - Incus version updated to `v7.1` #### Commits - core: provide optional curl downloader. by [@​abiosoft](https://github.com/abiosoft) in [#​1519](abiosoft/colima#1519) - chore: clean up file downloader by [@​abiosoft](https://github.com/abiosoft) in [#​1520](abiosoft/colima#1520) - core: rework apple silicon device detection by [@​abiosoft](https://github.com/abiosoft) in [#​1526](abiosoft/colima#1526) - core: refactor container stop logic to support forced shutdown by [@​abiosoft](https://github.com/abiosoft) in [#​1527](abiosoft/colima#1527) - build(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1528](abiosoft/colima#1528) - build(deps): bump actions/upload-artifact from 6.0.0 to 7.0.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1529](abiosoft/colima#1529) - build(deps): bump actions/setup-go from 6.2.0 to 6.3.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1530](abiosoft/colima#1530) - containerd: support user-provided containerd and buildkit config by [@​citadelgrad](https://github.com/citadelgrad) in [#​1523](abiosoft/colima#1523) - vm: enable nested virtualization for krunkit by [@​abiosoft](https://github.com/abiosoft) in [#​1531](abiosoft/colima#1531) - docs: add VM customization and update guide to FAQ by [@​citadelgrad](https://github.com/citadelgrad) in [#​1522](abiosoft/colima#1522) - core: rework host to guest file movements. by [@​abiosoft](https://github.com/abiosoft) in [#​1538](abiosoft/colima#1538) - Incus: support full restore after soft-delete by [@​abiosoft](https://github.com/abiosoft) in [#​1540](abiosoft/colima#1540) - build(deps): bump golang.org/x/term from 0.40.0 to 0.41.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1541](abiosoft/colima#1541) - core: make cache directory configurable by [@​reillylm](https://github.com/reillylm) in [#​1537](abiosoft/colima#1537) - build(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1544](abiosoft/colima#1544) - build(deps): bump github.com/fatih/color from 1.18.0 to 1.19.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1546](abiosoft/colima#1546) - build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1548](abiosoft/colima#1548) - core: update disk images by [@​abiosoft](https://github.com/abiosoft) in [#​1554](abiosoft/colima#1554) - docs: update krunkit installation to reference upstream by [@​acelinkio](https://github.com/acelinkio) in [#​1562](abiosoft/colima#1562) - net: support krunkit network.mode: shared by [@​acelinkio](https://github.com/acelinkio) in [#​1560](abiosoft/colima#1560) - build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1558](abiosoft/colima#1558) - build(deps): bump golang.org/x/term from 0.41.0 to 0.42.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1555](abiosoft/colima#1555) - core: update disk images by [@​abiosoft](https://github.com/abiosoft) in [#​1566](abiosoft/colima#1566) - chore: fix regression in terminal output by [@​abiosoft](https://github.com/abiosoft) in [#​1567](abiosoft/colima#1567) - build(deps): bump golang.org/x/term from 0.42.0 to 0.43.0 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1568](abiosoft/colima#1568) - vm: update disk mount script by [@​abiosoft](https://github.com/abiosoft) in [#​1571](abiosoft/colima#1571) - cli: show runtime for stopped instances in list output by [@​mschoenlaub](https://github.com/mschoenlaub) in [#​1574](abiosoft/colima#1574) - vm: allow use of unsupported disk images by [@​h0tw1r3](https://github.com/h0tw1r3) in [#​1576](abiosoft/colima#1576) - build(deps): bump golangci/golangci-lint-action from 9.2.0 to 9.2.1 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1573](abiosoft/colima#1573) - build(deps): bump actions/checkout from 6.0.2 to 6.0.3 by [@​dependabot](https://github.com/dependabot)\[bot] in [#​1578](abiosoft/colima#1578) - chore: minor fixes by [@​abiosoft](https://github.com/abiosoft) in [#​1579](abiosoft/colima#1579) #### New Contributors - [@​citadelgrad](https://github.com/citadelgrad) made their first contribution in [#​1523](abiosoft/colima#1523) - [@​reillylm](https://github.com/reillylm) made their first contribution in [#​1537](abiosoft/colima#1537) - [@​acelinkio](https://github.com/acelinkio) made their first contribution in [#​1562](abiosoft/colima#1562) - [@​mschoenlaub](https://github.com/mschoenlaub) made their first contribution in [#​1574](abiosoft/colima#1574) - [@​h0tw1r3](https://github.com/h0tw1r3) made their first contribution in [#​1576](abiosoft/colima#1576) **Full Changelog**: <abiosoft/colima@v0.10.1...v0.10.2> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
This change should help addresses #1559. This change should allow for l2 announcements to work when using tools like metallb, cilium l2 announcements.
both lima & krunkit support socket_vmnet
libkrunusingkrunkitlima-vm/lima#4137Verified that the templating adds another interface.
Will test tomorrow with finishing up a Kubernetes cluster and seeing if the L2 announcements work as expected.
One step closer to having gpu accelerated pods running in Kubernetes!